package com.lzx.activity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author lzx
 * @since 2022-11-10
 */
@Getter
@Setter
@ApiModel(value = "Voucher对象", description = "")
public class Voucher implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("活动id")
    private Integer activityId;

    @ApiModelProperty("支付金额")
    private Long payAmount;

    @ApiModelProperty("抵扣金额，单位元")
    private Long deductionAmount;

    @ApiModelProperty("0:普通劵,1:秒杀劵")
    private Integer type;

    @ApiModelProperty("0:上架,1:下架,3:过期")
    private Integer status;

    @ApiModelProperty("库存")
    private Integer stock;

    @ApiModelProperty("开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginTime;

    @ApiModelProperty("结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
}
